<script setup lang="ts">
import { ref,onMounted } from "vue";
import { RouterView } from "vue-router";
import ScaleScreen from "@/components/scale-screen";
import Headers from "./header.vue";
import Setting from "./setting.vue";
import { useSettingStore } from "@/stores/index";
import { storeToRefs } from "pinia";
import MessageContent from "@/components/Plugins/MessageContent";

import { getzjqkList } from "@/api//service";

const settingStore = useSettingStore();
const { isScale } = storeToRefs(settingStore);
const wrapperStyle = {};
onMounted(() => {
  let params = window.location.href;
  let arr = params.split("token="); console.log(arr[1]);
  settingStore.setToken(arr[1]);
  let parm = {
    xzdq: '530000000000',
    type: '99',
    beginTime: '2024-01-01',
    engTime: '2025-12-30'
  }
  getzjqkList(parm).then((res) => {
    console.log('12313123',res);
  });
})
</script>

<template>
  <scale-screen
    width="100%"
    height="1080"
    :delay="500"
    :fullScreen="false"
    :boxStyle="{
      background: '#03050C',
      overflow: isScale ? 'hidden' : 'auto',
    }"
    :wrapperStyle="wrapperStyle"
    :autoScale="isScale"
  >
    <div class="content_wrap">
      <Headers />
      <RouterView />
      <MessageContent />
    </div>
  </scale-screen>
  <Setting />
</template>

<style lang="scss" scoped>
.content_wrap {
  width: 100%;
  height: 100%;
  padding: 16px 16px 16px 16px;
  background-image: url("@/assets/img/pageBg.png");
  background-size: cover;
  background-position: center center;
}
</style>
